// Copyright (c) 2019 Presto Labs Pte. Ltd.
// Author: jaewon

#pragma once

#include <cstdint>
#include <string>

#include <nlohmann/json.hpp>

#include "coin1/fastfeed/view/base.h"

namespace fastfeed {
namespace view {

class StringJsonBuilder : public BuilderBase {
 public:
  ~StringJsonBuilder() final = default;

  bool UpdateByProto(const proto::Feed& feed) final;

  const nlohmann::json& json_object() const;
  const std::string& string() const;

 private:
  nlohmann::json json_obj_;
  const proto::Feed* feed_ = nullptr;
};  // class StringJsonBuilder

}  // namespace view
}  // namespace fastfeed
